using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace AdminApiTemplate.Aggregates.Login
{
    /// <summary>
    /// 企业微信登录
    /// </summary>
    public class ByWorkWxRequestModel
    {
        /// <summary>
        /// 随机数，用于保持请求和回调的状态，授权请求后原样带回给企业。
        /// </summary>
        [Description("随机数，用于保持请求和回调的状态，授权请求后原样带回给企业。")]
        [Required(ErrorMessage = "必填")]
        [MaxLength(50, ErrorMessage = "最多{0}个字符")]
        public string State { get; set; }

        /// <summary>
        /// 通过成员授权获取到的code
        /// </summary>
        [Description("通过成员授权获取到的code")]
        [Required(ErrorMessage = "必填")]
        [MaxLength(512, ErrorMessage = "最多{0}个字符")]
        public string Code { get; set; }

        /// <summary>
        /// 当前应用
        /// </summary>
        public string App { get; set; }
    }
}
